package com.macro.mall.tiny.modules.oms.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.macro.mall.tiny.modules.oms.dto.OrderCreateParam;
import com.macro.mall.tiny.modules.oms.dto.OrderQueryParam;
import com.macro.mall.tiny.modules.oms.dto.OrderUpdateAmountParam;
import com.macro.mall.tiny.modules.oms.dto.OrderUpdateStatusParam;
import com.macro.mall.tiny.modules.oms.vo.OrderListVO;
import com.macro.mall.tiny.modules.oms.model.Order;
import com.macro.mall.tiny.modules.oms.model.OrderGoods;
import com.macro.mall.tiny.modules.oms.model.OrderLog;

import java.util.List;

public interface OrderService extends IService<Order> {
    // 新增方法
    String createOrder(OrderCreateParam orderCreateParam);

    List<Order> getOrderList(OrderQueryParam queryParam);

    Page<OrderListVO> getUserOrderList(OrderQueryParam queryParam);

    Order getOrderDetail(String orderNo);

    List<OrderGoods> getOrderGoodsByOrderNo(String orderNo);

    List<OrderLog> getOrderLogsByOrderNo(String orderNo);
    
    /**
     * 更新订单状态
     * @param updateStatusParam 状态更新参数
     * @return 是否更新成功
     */
    boolean updateOrderStatus(OrderUpdateStatusParam updateStatusParam);
    
    /**
     * 更新订单支付金额
     * @param updateAmountParam 金额更新参数
     * @return 是否更新成功
     */
    boolean updateOrderAmount(OrderUpdateAmountParam updateAmountParam);
}